package com.iot.ic.modules.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.iot.ic.modules.dao.TradeDao;
import com.iot.ic.modules.model.Trade;
import com.iot.ic.modules.service.TradeService;

@Service("tradeService")
public class TradeServiceImpl implements TradeService {
    @Autowired
    private TradeDao tradeDao;

	@Override
	public Trade saveOrUpdateObject(Trade trade) throws Exception {
		Trade trade2= (Trade) tradeDao.addOrUpdateObject(trade);
		return trade2;
		
	}

	@Override
	public List<Trade> findTrade(Integer id, Integer userId, Integer drId)throws Exception {
		return tradeDao. findTrade( id,  userId,  drId);
	}

}
